﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Configuration;
using Windows.Foundation;
using Windows.Storage;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Imaging;

namespace BoolanElement.Storage
{
    public class BPTFileInformation
    {
        public BPTFileInformation()
        {
            FileSavedPosition = FilePosition.FromLibrary;
        }
        public enum FileRatio
        {
            Ratio4_3 = 0,
            Ratio16_9 = 1
        }

        public enum FilePosition
        {
            FromLibrary = 0,  //文件存储在默认文件目录下
            Pick = 1          //用户选择打开的文件
        }

        public const int Resolution4x3=0;
        public const int Resolution16x9=1;
        /// <summary>
        /// 文件尺寸
        /// Resolution4x3为4：3
        /// Resolution16x9为16：9
        /// </summary>
        public FileRatio Resolution;
        /// <summary>
        /// 文件显示名
        /// </summary>
        public String FileName{set;get;}
        /// <summary>
        /// 文件存储名
        /// </summary>
        public String StorageName{set;get;}
        /// <summary>
        /// 文件存储名
        /// </summary>
        public String GUID { 
            get 
            {
                return StorageName.Substring(0, StorageName.IndexOf("."));
            }
        }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime{set;get;}
  
        /// BPT的主题GUID
        /// </summary>
        public string ThemeGuid { set; get; }

        /// <summary>
        /// 是否为模版文件,true为模版文件
        /// </summary>
        public bool IsTheme { set; get; }

        /// <summary>
        /// 封面
        /// </summary>
        public BitmapImage CoverImage{set;get;}

        public FilePosition FileSavedPosition { set; get; }

        public StorageFile File { set; get; }

        /// <summary>
        /// 最后更新时间
        /// </summary>
        public DateTime UpdateTime { set; get; }

        public BooSlide FirstSlide;

        public Dictionary<string, BitmapImage> ImageResources;

        public Canvas CoverCanvas;
    }
}
